home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 November / Chip_2000-11_cd2.bin / sharewar / Slunec / app / 17 / _SETUP.1 / Prevest projekt do slozky dokumentu.pw < prev    next >
Text File  |  2000-08-30  |  1KB  |  41 lines

  1.  
  2. {*******************************************************}
  3. {                                                       }
  4. {     Programmer's Wizard 2 Pascal Script               }
  5. {     (popis jazyka v souboru SCRIPT.DOC)               }
  6. {                                                       }
  7. {*******************************************************}
  8. uses ScriptUtils;
  9.  
  10. function GetVerStr: string;
  11. var
  12.   mMajor, mMinor, mRel: Integer;
  13. Begin
  14.   GetVersionEx(mMajor, mMinor, mRel);
  15.   result := 'v' + IntToStr(mMajor) + '.' + IntToStr(mMinor) + '.' +
  16.     IntToStr(mRel);
  17. end;
  18.  
  19. function GetValidVerStr: string;
  20. Begin
  21.   result := 'v2.0.1'; //pozadovana verze PW
  22. end;
  23.  
  24. var
  25.   mDocuments: Array of String;
  26. Begin
  27.   if GetValidVerStr <> GetVerStr then //nespravna verze?
  28.     ShowMessage('Upozorn∞nφ: tento skript byl napsßn pro Programmers Wizard ' +
  29.       GetValidVerStr + '. Momentßln∞ spuÜt∞nß verze: ' + GetVerStr);
  30.   
  31.   if not (IsProjectOpened) then Begin
  32.     ShowMessage('P°ed pou₧itφm tohoto skriptu musφ b²t otev°en nprojekt.');
  33.     Halt;
  34.   end;
  35.  
  36.   //prepsat vsechny soubory z projektu do slozky Dokumenty
  37.   EnumProjectFiles(GetCurrentProject, mDocuments);
  38.   SetDocuments(mDocuments);
  39. end.
  40.  
  41.